package com.sunrise.xdoc.view.finance;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

import com.sunrise.xdoc.entity.finance.PhieuThanhToan;
import com.sunrise.xdoc.entity.finance.PhieuThanhToan.LoaiThanhToan;
import com.sunrise.xdoc.view.AbstractView;

@ManagedBean
@SessionScoped
public class PhieuChiView extends AbstractView<PhieuThanhToan> {
	private static final long serialVersionUID = 8933700081102034890L;

	@Override
	protected String getDataModelBeanName() {
		return "phieuChiDataModel";
	}

	@Override
	protected String getDetailPanelViewId() {
		return "phieuChiDialogId";
	}

	@Override
	public void saveOrUpdate() {
		getEditedEntity().setLoai(LoaiThanhToan.PHIEU_CHI);
		super.saveOrUpdate();
	}
}
